package com.zhang.zxx.boot.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * GeneratorDTO:MP代码生成请求参数
 *
 * @author zhangxiaoxiang
 * @date 2021/11/21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("GeneratorDTO代码生成请求参数")
public class GeneratorDTO implements Serializable {
    /**
     * url
     */
    @ApiModelProperty(value = "url", example = "jdbc:mysql://182.43.162.76:3306/zxx_boot?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8")
    @NotBlank(message = "url不能为空")
    private String url;

    /**
     * username
     */
    @ApiModelProperty(value = "username", example = "root")
    @NotBlank(message = "作者姓名不能为空")
    private String username;

    /**
     * password
     */
    @ApiModelProperty(value = "password", example = "root")
    @NotBlank(message = "password不能为空")
    private String password;

    /**
     * 作者姓名
     */
    @ApiModelProperty(value = "作者姓名", example = "zhangxiaoxiang")
    @NotBlank(message = "作者姓名不能为空")
    private String author;


    /**
     * 主要3层代码存放路径
     */
    @ApiModelProperty("主要3层代码存放路径[默认运行项目的/src/main/java下]")
    private String outputDir;
    /**
     * mapperXML存放路径
     */
    @ApiModelProperty("mapperXML存放路径[默认运行项目的/src/main/resources/mapper/下]")
    private String outputXmlDir;
    /**
     * 基本包名
     */
    @ApiModelProperty(value = "默认com.zhang.zxx.boot", example = "com.zhang.zxx.boot", required = true)
    private String packageParent;
    /**
     * 待生成数据库的表明
     */
    @ApiModelProperty(value = "默认sys_user_info", example = "sys_user_info", required = true)
    @NotBlank(message = "待生成数据库的表明")
    private String addInclude;
}
